/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import com.mysql.jdbc.MySQLConnection;
import model.*;
import UTIL.*;

/**
 *
 * @author Tin Pham
 */
public class AlbumDAO {
    
    public static Boolean taoAlbum(Album album) {
        MysqlConnection mysqlConnect = new MysqlConnection();
        if (mysqlConnect.connect()) {
            String sql = "INSERT INTO albums (name, descriptions, created_time, path) VALUES ('" + album.getName() +"', '" + album.getDescription() + "', '2013-02-04', '" + album.getPath() + "');";
            return mysqlConnect.executeCommand(sql);
        } else {
            return false;
        }
    }
    
}
